<?php
$uses_api = $bank_info['Bank']['uses_api'];
?>
<script>
    $("body").addClass("home");
</script>

<div class="row-fluid">
    <div class="image-wrapper">
        <?php echo $this->Html->image('app/logo.png'); ?>
    </div>
</div>

<?php
    if($uses_api == 'No'){
    ?>
        <div class="row-fluid">
            <div class="search-row">
                <div style="color: red; padding: 10px; text-align: center;"><?php echo $this->Session->flash(); ?></div>

                <form action="<?php echo $this->Html->url(array('action' => 'search')); ?>" method="post">
                    <div class="input-append" style="height: 45px;">
                        <input name="Student[id]" type="text" class="input-xxlarge" autofocus="autofocus" placeholder="Find Student By Index No." required="" style="height: 100%;" />
                        <button class="btn btn-large" type="submit" value="Search" style="height: 100%;"><i class="icon-search"></i></button>
                    </div>
                </form>
            </div>
        </div>
    <?php
    }
?>

<div class="row-fluid">
    <div class="button-row">
        <a class="shortcut" href="<?php echo $this->Html->url(array('action' => 'editprofile')); ?>">
            <span class="button-icon"><i class="icon-user-md icon-5x"></i></span>
            <span class="button-label">Edit Profile</span>
        </a>
        <?php
            if($uses_api == 'No'){
                if($authuser['user_level'] == 'Supervisor' || $authuser['user_level'] == 'Control User'){
                ?>
                    <a class="shortcut" href="<?php echo $this->Html->url(array('controller'=>'Bank','action' => 'reports')); ?>">
                        <span class="button-icon"><i class="icon-cogs icon-5x"></i></span>
                        <span class="button-label">Reports</span>
                    </a>
                <?php
                }
            }
        ?>

        <a class="shortcut" href="<?php echo $this->Html->url(array('action' => 'logout')); ?>">
            <span class="button-icon"><i class="icon-off icon-5x"></i></span>
            <span class="button-label">Sign Out</span>
        </a>
    </div>
</div>